-- GENERATED SPELL FOR [Centipaar Tunneler] --


function spell0_5459(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(6016,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5459', 20000, 1)
end

function spell1_5459(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_5459', 616, 1)
end

function Sorts_5459(pUnit, Event)
local choix_sorts_5459 = math.random(0, 1)
if choix_sorts_5459 == 0 then
pUnit:RegisterEvent('spell0_5459', 1, 1)
end
if choix_sorts_5459 == 1 then
pUnit:RegisterEvent('spell1_5459', 1, 1)
end
end

function mob5459_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5459', math.random(1500, 3000), 1)
end

function mob5459_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5459_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5459_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5459, 1, 'mob5459_Action')
RegisterUnitEvent(5459, 2, 'mob5459_Leave')
RegisterUnitEvent(5459, 3, 'mob5459_Kill')
RegisterUnitEvent(5459, 4, 'mob5459_Die')
